package com.swanclouds.redfish.managers.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * @author 李文强
 * description
 */

public class Parameter {

    @JsonProperty("ProtocolEnabled")
    private Boolean protocolEnabled;

    @JsonProperty("Port")
    private Integer port;

   public Parameter protocolEnabled(Boolean protocolEnabled){
       this.protocolEnabled = protocolEnabled;
       return this;
   }

    public Parameter port(Integer port){
        this.port = port;
        return this;
    }

    public static Parameter parameter(){
       return new Parameter();
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "{" +
                "protocolEnabled=" + protocolEnabled +
                ", port=" + port +
                '}';
    }
}
